This docs say it should return FALSE if the display can't be opened,
but it was failing.
https://bugzilla.gnome.org/show_bug.cgi?id=771959
gboolean retval;
if (gtk_initialized)
- return GDK_PRIVATE_CALL (gdk_display_open_default) () != NULL;
+ goto done;
gettext_initialization ();
if (!check_setugid ())
return FALSE;
- gtk_group = gtk_get_option_group (TRUE);
+ gtk_group = gtk_get_option_group (FALSE);
context = g_option_context_new (parameter_string);
g_option_context_add_group (context, gtk_group);
g_option_context_free (context);
- return retval;
+ if (!retval)
+ return FALSE;
+
+done:
+ return GDK_PRIVATE_CALL (gdk_display_open_default) () != NULL;
}